package com.ecloud.common.standard;

/**
 * @author Squbi
 */
public interface PageToLimit extends IPage {
    /**
     * 默认转化当前page到Limit规则
     *
     * @author Squbi
     * @date 2021/8/3 14:14
     */
    default void toLimit() {
        this.setPageIndex(this.getPageIndex() >= 1 ? (this.getPageIndex() - 1) * this.getPageSize() : 0);
    }
}
